package be.gnx.fogo.application.model;

public class Address {

  private Long id;

  private Country country;

  private String postcode;

  private String city;

  private String streetname;

  private String number;

  private String bus;

  public String getStreetNumberBus() {
    String streetNumberBus = "";
    boolean addSpace = false;
    if (getStreetname() != null) {
      streetNumberBus += getStreetname();
      addSpace = true;
    }
    if (getNumber() != null) {
      if (addSpace) {
        streetNumberBus += " ";
      }
      streetNumberBus += getNumber();
      addSpace = true;
    }
    if (getBus() != null) {
      if (addSpace) {
        streetNumberBus += " ";
      }
      streetNumberBus += getBus();
    }
    return streetNumberBus;
  }

  public String getPostcodeCity() {
    String postcodeCity = "";
    boolean addSpace = false;
    if (getPostcode() != null) {
      postcodeCity += getPostcode();
      addSpace = true;
    }
    if (getCity() != null) {
      if (addSpace) {
        postcodeCity += " ";
      }
      postcodeCity += getCity();
    }
    return postcodeCity;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Country getCountry() {
    return country;
  }

  public void setCountry(Country country) {
    this.country = country;
  }

  public String getPostcode() {
    return postcode;
  }

  public void setPostcode(String postcode) {
    this.postcode = postcode;
  }

  public String getCity() {
    return city;
  }

  public void setCity(String city) {
    this.city = city;
  }

  public String getStreetname() {
    return streetname;
  }

  public void setStreetname(String streetname) {
    this.streetname = streetname;
  }

  public String getNumber() {
    return number;
  }

  public void setNumber(String number) {
    this.number = number;
  }

  public String getBus() {
    return bus;
  }

  public void setBus(String bus) {
    this.bus = bus;
  }

}
